package com.hnichr.crm.common.followup.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 跟进记录对象 crm_followup_record
 *
 * @author Cheng
 * @date 2022-11-24
 */
@Data
@Entity
@Table(name = "crm_followup_record")
@Schema(description = "跟进记录")
@EqualsAndHashCode(callSuper = false)
public class CrmFollowupRecord extends BaseEntity {

    /**
     * id
     */
    @Id
    @Generator
    @Schema(description = "id")
    @Column(name = "id", length = 64)
    private String id;
    /**
     * 关联类型
     */
    @Schema(description = "关联类型")
    @Column(name = "types", length = 50)
    @Dict(dicCode = "followup_type")
    private String types;
    /**
     * 类型ID(跟进类型的id)
     */
    @Schema(description = "类型ID(跟进类型的id)")
    @Column(name = "types_id", length = 64)
    private String typesId;
    /**
     * 跟进内容
     */
    @Schema(description = "跟进内容")
    @Column(name = "content", length = 1000)
    private String content;
    /**
     * 跟进类型(crm_customer:客户跟进,)
     */
    @Schema(description = "跟进类型(crm_customer:客户跟进,)")
    @Column(name = "category", length = 255)
    private String category;
    /**
     * 下次联系时间
     */
    @Schema(description = "下次联系时间")
    @Column(name = "next_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date nextTime;
    /**
     * 商机ID
     */
    @Schema(description = "商机ID")
    @Column(name = "business_ids", length = 255)
    private String businessIds;
    /**
     *
     */
    @Schema(description = "")
    @Column(name = "business_names", length = 255)
    private String businessNames;
    /**
     * 联系人ID
     */
    @Schema(description = "联系人ID")
    @Column(name = "contacts_ids", length = 255)
    private String contactsIds;
    /**
     *
     */
    @Schema(description = "")
    @Column(name = "contacts_names", length = 255)
    private String contactsNames;
    /**
     * 批次 比如附件批次
     */
    @Schema(description = "批次 比如附件批次")
    @Column(name = "batch_id", length = 64)
    private String batchId;

}
